<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<style>
  table,
  th,
  td {
    border: solid 1px black;
    border-collapse: collapse;
  }

  th,
  td {
    width: 100px;
    height: 50px;
    text-align: center;
  }
</style>

<body>
  <h2>订单确认</h1>

</body>
<script>
  var price = +prompt('输入商品价格:');
  var num = +prompt('输入商品数量');
  var address = +prompt('输入收货地址');
  var sum = price * num;
  var s = `
  <table>
      <thead>
        <tr>
          <th>商品名称</th>
          <th>商品价格</th>
          <th>商品数量</th>
          <th>商品总价</th>
          <th>收货地址</th>
        </tr>
      </thead>
      <tbody>
         <tr>
          <td>手机</td>
          <td>${price}</td>
          <td>${num}</td>
          <td>${sum}</td>
          <td>${address}</td>
        </tr>
      </tbody>
    </table>
       
        `;
  document.write(s);

</script>

</html>